package com.shiyi.sqlSession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @Author: 十一
 * @Date: 2020/11/9 14:50
 * @Descrption
 **/
public interface SqlSession {

    public <E> List<E> selectList(String statementId, Object... params) throws SQLException, IllegalAccessException, IntrospectionException, InstantiationException, NoSuchFieldException, InvocationTargetException, ClassNotFoundException;

    public <T> T selectOne(String statementId,Object... params) throws SQLException, IllegalAccessException, IntrospectionException, InstantiationException, ClassNotFoundException, InvocationTargetException, NoSuchFieldException;

    public <T> T getMapper(Class<T> clazz);

    public <T> T insert(String statementId,Object... params) throws IllegalAccessException, IntrospectionException, InstantiationException, NoSuchFieldException, SQLException, InvocationTargetException, ClassNotFoundException;

    public <T> T update(String statementId,Object... params) throws ClassNotFoundException, SQLException, NoSuchFieldException, IllegalAccessException;

    public <T> T delete(String statementId,Object... params) throws ClassNotFoundException, SQLException, NoSuchFieldException, IllegalAccessException;
}
